<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<h3><fmt:message key="server.heading"/></h3>
<table class="borderedlist">
	<tr>
      <td width="20%"><fmt:message key="server.name"/></td>
      <td><c:out value="${server.name}"/></td>
    </tr>
	<tr>
	  <td><fmt:message key="server.hostname"/></td>
	  <td><c:out value="${server.hostname}"/></td>	
    </tr>
    <tr>
      <td><fmt:message key="server.port"/></td>
	  <td><c:out value="${server.port}"/></td>	
    </tr>
    <tr>
      <td><fmt:message key="server.description"/></td>
      <td><c:out value="${server.description}"/></td>	
    </tr>
    <tr>
    	<td><fmt:message key="server.status"/></td>
    	<td>
			<c:if test="${server.status == '1'}">
					<img src="images/state-running.png" alt="<fmt:message key="server.state.running"/>"/><small><fmt:message key="server.state.running"/></small>
			</c:if>
			<c:if test="${server.status == '0'}">
					<img src="images/state-stopped.png" alt="<fmt:message key="server.state.stopped"/>"/><small><fmt:message key="server.state.stopped"/></small>
			</c:if>
			<c:if test="${server.status == '-1'}">
					<img src="images/state-unknown.png" alt="<fmt:message key="server.state.unknown"/>"/><small><fmt:message key="server.state.unknown"/></small>
			</c:if>
		</td>
    </tr>
</table>

<form:form>
  <input type="button" align="center" class="btn" onmouseover="this.className='btn btnhov'" onmouseout="this.className='btn'" onclick="document.location='<c:url value="servers.htm"/>'" value="<fmt:message key="server.all.heading"/>"/>
  <input type="button" align="center" class="btn" onmouseover="this.className='btn btnhov'" onmouseout="this.className='btn'" onclick="document.location='serveredit.htm?id=<c:out value="${server.id}"/>'" value="<fmt:message key="server.edit.heading"/>"/>
</form:form>
